package com.fingard.dsp.core.controllor;


import com.fingard.dsp.core.biz.DSPService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Parker on 2020-07-29.
 * @version 1.0
 */
@RestController
@RequestMapping("/dsp")
@EnableAsync
public class DSPControllor {
    @Autowired
    private DSPService dspService;

    @PostMapping(value = "/sendToDSP")
    public String sendToDSP(@RequestParam(name = "xmlData") String xmlData, HttpServletRequest request) throws Exception {
        return dspService.dealTrans(xmlData,request);
    }
}
